﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DELVE_GAME.ViewStructure.MapEditor;
using Microsoft.Xna.Framework.Audio;

namespace DELVE_GAME.ViewStructure.GameActions
{
    class MapCreatorGameAction : GameAction
    {
        private View view;
        private MapEditorInitStage stage;
        private MapEditorStage refresher;
        private Map map;
        private SoundEffectInstance sound;
        public MapCreatorGameAction(View targetView, MapEditorInitStage initStage, MapEditorStage editingStage, SoundEffectInstance sound)
        {
            view = targetView;
            this.stage = initStage;
            this.refresher = editingStage;
            this.sound = sound;
        }

        public override void doAction()
        {
            stage.initializeMap();
            sound.Play();
            refresher.updateMap();
            view.gotoNextStage();
        }
    }
}
